import React, { Component } from 'react'
import '@css/home/home_recommend.scss'

export default class HomeRecommend extends Component{
    constructor(props){
        super(props)
        this.state = {

        }
    }
    render() {
        return <div className="recom">
            <div className="title">
                <div className="line">
                    <span>猜你喜欢</span>
                </div>
            </div>
            <ul className="list">
                {this.props.likeList.map((item, i)=>
                    <li className="item" key={i}>
                        <div className="left">
                            <img src={item.imgSrc} alt=""/>
                        </div>
                        <div className="right">
                            <div className="info">
                                <h3>{item.title}</h3>
                                <h4>{item.subInfo}</h4>
                            </div>
                            <div className="price">
                                <span className="now-price"><b>{item.nowPrice}</b>元</span>
                                <span className="old-price">门市价: <strike>{item.oldPrice}</strike>元 </span>
                            </div>
                            <div className="sales">
                                已售： {item.saleNum}
                            </div>
                        </div>
                    </li>    
                )}
            </ul>
        </div>
    }
}